Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[O2B-719] Add range based filtering for run number #1810

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

hattinf
Copy link
Collaborator

@hattinf hattinf commented Dec 5, 2024

I have a JIRA ticket

  • branch and/or PR name(s) include(s) JIRA ID
  • issue has "Fix version" assigned
  • issue "Status" is set to "In review"
  • PR labels are selected

Notable changes for users:
-runNumber filter now accepts ranges as well

Notable changes for developers:

Changes made to the database:

@hattinf hattinf added the backend label Dec 5, 2024
@hattinf hattinf self-assigned this Dec 5, 2024
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 96.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 43.94%. Comparing base (86f5f39) to head (4d5dc66).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/domain/dtos/filters/RunFilterDto.js 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1810      +/-   ##
==========================================
- Coverage   44.06%   43.94%   -0.13%     
==========================================
  Files         889      889              
  Lines       15869    15892      +23     
  Branches     2993     3000       +7     
==========================================
- Hits         6993     6984       -9     
- Misses       8876     8908      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

lib/usecases/run/GetAllRunsUseCase.js Outdated Show resolved Hide resolved
lib/usecases/run/GetAllRunsUseCase.js Outdated Show resolved Hide resolved
@hattinf hattinf requested a review from martinboulais December 9, 2024 11:21
@martinboulais
Copy link
Collaborator

The idea is good, but there is a major flaw: when using a very big range (with prod data) the app simply crash because the list of run numbers is too big.
A possible solution is to limit the range, for example to 100 (please read Joi documentation to put it in the DTO).
The best solution would be to use min and max SQL function for run, but I am not sure we can properly do that with the current query builder.

@martinboulais martinboulais changed the title [O2B-719] add range based filtering for run number [O2B-719] Add range based filtering for run number Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants